package com.stud.system.domain;

import com.baomidou.mybatisplus.annotation.SqlCondition;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.stud.common.annotation.Excel;
import com.stud.common.core.domain.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.List;

/**
 * 流程审批记录对象 t_workflow_log
 *
 * @author Stud
 * @date 2023-03-06
 */
@Schema(description = "流程审批记录")
@Data
@TableName("t_workflow_log")
public class WorkflowLog extends BaseEntity {

    @Excel(name = "流程定义任务ID")
    @Schema(description = "流程定义任务ID")
    private Long definitionTaskId;

    @Excel(name = "流程实例任务ID")
    @Schema(description = "流程实例任务ID")
    private Long taskId;

    @Excel(name = "流程实例ID")
    @Schema(description = "流程实例ID")
    private Long workflowId;

    @Excel(name = "业务ID")
    @Schema(description = "业务ID")
    private Long businessId;

    @Excel(name = "业务编码")
    @Schema(description = "业务编码")
    private String businessCode;

    @Excel(name = "任务编码")
    @Schema(description = "任务编码")
    private String taskCode;

    @TableField(condition = SqlCondition.LIKE)
    @Excel(name = "任务名称")
    @Schema(description = "任务名称")
    private String taskName;

    @Excel(name = "任务类型")
    @Schema(description = "任务类型(0:启动任务-通常不需要审核;1:普通任务;2:主任务)")
    private String taskType;

    @Excel(name = "审批角色")
    @Schema(description = "审批角色")
    private String roleCode;

    @Excel(name = "审批人ID")
    @Schema(description = "审批人ID")
    private Long userId;

    @TableField(condition = SqlCondition.LIKE)
    @Excel(name = "审批人名字")
    @Schema(description = "审批人名字")
    private String userName;

    @Excel(name = "任务状态(0:通过;1:驳回)")
    @Schema(description = "任务状态(0:通过;1:驳回)")
    private String taskStatus;

    @Excel(name = "任务表单状态")
    @Schema(description = "任务表单状态")
    private String taskFormStatus;

    @Excel(name = "任务审批意见")
    @Schema(description = "任务审批意见")
    private String taskInfo;

    @Excel(name = "开关")
    @Schema(description = "开关")
    private String flag;

    @Schema(description = "审批角色名称")
    @TableField(exist = false)
    private String roleName;

    @Schema(description = "附件")
    @TableField(exist = false)
    private List<Long> FileLinkIdList;
}
